package com.ssm.domain;

import com.ssm.utils.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

public class SysFile {
    private String id;
    private String filename;
    private String filesize;
    private String filetype;
    private String filepath;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    private Date uploadtime;
    private String uploadtimeStr;
    private List<Folder> folders;
    private String username;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFilename() {
        return filename;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    public String getFilesize() {
        return filesize;
    }

    public void setFilesize(String filesize) {
        this.filesize = filesize;
    }

    public String getFiletype() {
        return filetype;
    }

    public void setFiletype(String filetype) {
        this.filetype = filetype;
    }

    public String getFilepath() {
        return filepath;
    }

    public void setFilepath(String filepath) {
        this.filepath = filepath;
    }

    public Date getUploadtime() {
        return uploadtime;
    }

    public void setUploadtime(Date uploadtime) {
        this.uploadtime = uploadtime;
    }

    public String getUploadtimeStr() {
        if(uploadtime!=null){
            uploadtimeStr= DateUtils.date2String(uploadtime,"yyyy-MM-dd HH:mm:ss");
        }
        return uploadtimeStr;
    }

    public void setUploadtimeStr(String uploadtimeStr) {
        this.uploadtimeStr = uploadtimeStr;
    }

    public List<Folder> getFolders() {
        return folders;
    }

    public void setFolders(List<Folder> folders) {
        this.folders = folders;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
}
